package com.example.leo.mycharmingstudent.customview;

import android.animation.ObjectAnimator;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.leo.mycharmingstudent.R;

public class TestActivity extends AppCompatActivity {

    private TextView tvTestBg;
    private View testRoundPB;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);

        /*tvTestBg = findViewById(R.id.tv_test_bg);
        tvTestBg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                tvTestBg.setSelected(!tvTestBg.isSelected());
            }
        });*/
        testRoundPB = findViewById(R.id.test_round_progress_bar);
        testRoundPB.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ObjectAnimator.ofInt(testRoundPB,"progress1",0,100)
                        .setDuration(5000).start();
            }
        });
    }
}
